import axios from 'axios';
import { MessageBox, Message } from 'element-ui';
import {getToken, removeToken} from "@/utils/auth";
//lian
const httpUtil = axios.create({
    timeout: 12000 // request timeout
})

httpUtil.interceptors.request.use(
    config => {
        const token = getToken();
        if (token) {
            config.headers['X-Token'] = token
        }
        return config
    },
    error => {
        return Promise.reject(error)
    }
)